import request from '@/router/axios';

/**
 *
 * 检验单管理接口大全
 */
export const getPage = (current, size, params) => {
    return request({
        url: '/api/mes-product/inspection-document/page',
        method: 'get',
        params: {
            ...params,
            current,
            size
        }
    });
};


export const getDetail = (id) => {
    return request({
        url: '/api/mes-product/inspection-document/detail',
        method: 'get',
        params: {
            id
        }
    });
};

export const getList = (params) => {
    return request({
        url: '/api/mes-product/qms-inspection-object/list',
        method: 'get',
        params
    });
};

//延保 /mes-warehouse/packing/extension-days

export const extension = (data, extensionDays) => {
    return request({
        url: `/api/mes-product/qms-inspection-object/extension-days?extensionDays=${extensionDays}`,
        method: 'post',
        data
    });
};

//报废登记 /api/mes-product/mro/centerproduct/scrap/registry'
export const scrap = (data, reason) => {
    return request({
        url: `/api/mes-product/qms-inspection-object/scrap-registry?reason=${reason}`,
        method: 'post',
        data
    });
};

/**
 *  查询MA MI CRI 数量
 */

export const getQcCalculateAqlInfo = (data) => {
    return request({
        url: '/api/mes-admin/aql/calculate-qc-info-by-aql',
        method: 'post',
        data
    });
}

/**
 * 获取物料配置AQL信息
 */

export const getAqlInfo = (params) => {
    return request({
        url: 'api/mes-admin/partmaster/get-aql-info-by-part-id',
        method: 'get',
        params
    });
}


